#include "parameterdockwidget.h"

ParameterDockWidget::ParameterDockWidget(QWidget* parent = 0, QAbstractTableModel* data = 0): QDockWidget(parent), model(data) {
    QTableView* table = new QTableView(this);
    table->setEditTriggers(QTableView::NoEditTriggers);
    table->setModel(model);

    QVBoxLayout* layout = new QVBoxLayout();
    layout->addWidget(table);

    QWidget* content = new QWidget();
    content->setLayout(layout);

    setWidget(content);
    connect(model, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), table, SLOT(update()));
}
